How to parse a string to date and back to string with same format

welcome to shbcf.ru